
from django.urls import re_path
from rest_framework.routers import DefaultRouter

from meiduo_admin.views import users, statistical, skus

urlpatterns = [
    re_path(r'^authorizations/$', users.AdminAuthorizeView.as_view()),
    re_path(r'^statistical/day_active/$', statistical.UserDayActiveView.as_view()),
    re_path(r'^statistical/day_orders/$', statistical.UserDayOrdersView.as_view()),
    re_path(r'^statistical/month_increment/$', statistical.UserMonthCountView.as_view()),

    re_path(r'^users/$', users.UserInfoView.as_view()),

    re_path(r'^skus/simple/$', skus.SKUSimpleView.as_view()),
]


# 图片管理路由
from rest_framework.routers import DefaultRouter
router = DefaultRouter()
router.register('skus/images', skus.SKUImageViewSet, basename='images')
urlpatterns += router.urls